package com.ai.bitcoin.service;

import com.ai.bitcoin.input.RedeemInputDto;
import com.ai.bitcoin.jpa.entity.BccUser;
import com.ai.bitcoin.output.GeneralReponse;
import org.springframework.http.ResponseEntity;
import org.springframework.transaction.annotation.Transactional;

import java.io.InputStream;

public interface RedeemCodeService {

    GeneralReponse create(RedeemInputDto dto);

    GeneralReponse exchange(String code, BccUser bccUser);

    /**
     * 根据excel导入生成excel
     *
     * @param is 文件流
     * @return 生成的code excel
     */
    @Transactional(rollbackFor = Exception.class)
    ResponseEntity<byte[]> createByExcel(InputStream is) throws Exception;
}
